<?php
/**
 * Created by PhpStorm.
 * User: yangh
 * Date: 2017/8/5
 * Time: 9:21
 */

namespace app\api\model;

//use apo\api\model\Zxs_User_Msg;

class User extends BaseModel
{
//    protected $table = 'user';

    protected $hidden = ['user_id','user_openid','user_password'];

    public function userInfo(){
        return $this->hasOne('ZxsUserMsg','user_id','user_id');
    }



    public static function getByOpenID($openid){
        $user = self::where('user_openid','=',$openid)->find();
        return $user;
    }

}